//
//  HPHomeViewController.swift
//  MyWeibo
//
//  Created by apple on 16/4/6.
//  Copyright © 2016年 Apengpeng. All rights reserved.
//

import UIKit

class HPHomeViewController: HPVisitorViewController {
    

    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        upDateUI()
    }
    
    // 更新界面
    private func upDateUI() {
        
        visitorView?.setVisitorViewInfor(true, imageName: "visitordiscover_feed_image_smallicon", suggestText: "登录微博\n世界发生巨大变化\n登上微信\n生活只有秀恩爱晒结晶")
        
//        // 设置导航来两边的按钮
//        let btn = UIButton()
//        btn.setImage(UIImage(named: "navigationbar_pop"), forState: .Normal)
//        btn.setImage(UIImage(named: "navigationbar_pop_highlighted"), forState: .Highlighted)
//        // 设置frame
//        btn.sizeToFit()
//        navigationItem.rightBarButtonItem = UIBarButtonItem(customView: btn)
        
//       第一次封装
//        navigationItem.rightBarButtonItem = UIBarButtonItem(imageName: "navigationbar_pop")
//        第二次封装
//        navigationItem.rightBarButtonItem = UIBarButtonItem(imageName: "navigationbar_pop", style: .Plain, target: self, action: "popController")
        navigationItem.rightBarButtonItem = UIBarButtonItem(imageName: "navigationbar_pop", target: self, action: "pushNextVc")
        navigationItem.leftBarButtonItem = UIBarButtonItem(imageName: "navigationbar_friendsearch", target: self, action: "pushNextVc")
    }
    
    
    @objc private func pushNextVc() {
        let vc = HPTestViewController()
        print("pushNextVc")
        navigationController?.pushViewController(vc, animated: true)
    }
    
  

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    // MARK: - Table view data source

    override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        // #warning Incomplete implementation, return the number of sections
        return 0
    }

    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        // #warning Incomplete implementation, return the number of rows
        return 0
    }

  

}
